﻿<%@page import="java.nio.channels.SeekableByteChannel"%>
<%@page import="cn.sendto.model.ResidentInfoModel"%>
<%@page import="cn.sendto.model.UserInfoModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页</title>
	<link rel="stylesheet" type="text/css"  href="css/main.css"  />
</head>
<body>
<div style="text-align: center;">
	<%
		 Cookie[] cks = request.getCookies();
		if (cks != null) {
			for (int i = 0; i < cks.length; i++) {
				if(cks[i].getName().equals("username")){
					out.print("欢迎您登陆，"+cks[i].getValue());
				}
			}
		} 
		 if (session.getAttribute("loginUser") != null) {
			UserInfoModel uim = (UserInfoModel) session.getAttribute("loginUser");
				out.print("欢迎您登陆，" + uim.getName());
		}else if(session.getAttribute("loginResident") != null){
			ResidentInfoModel rim = (ResidentInfoModel)session.getAttribute("loginResident");
			out.print("欢迎您登陆，" + rim.getName());
		}
	%>
	</div>
	<div class="CurPageTxt">当前位置：主页</div>
	<div style="margin-left: 100px;">
		<div>
		<div class="maindiv">
			<div class="textdiv">
				通知公告
			<ul type="disc">
				<p><li>上课班注意教室环境、洒水、通风、注意卫生</li></p>
				<p><li>下课务必关灯、关门窗、带走垃圾</li></p>
			</ul>
			</div>
		</div>
		<div class="maindiv">
			<div class="textdiv">
				最新动态
			<ul type="disc">
				<p><li>教室新添一批器材，小心使用不要损坏</li></p>
			</ul>
			</div>
		</div>
		</div>
		
		</div>
</body>
</html>